Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
@trust/keyto
Advanced tools
A utility for translating cryptographic keys between representations.
Keyto is pronounced 'key-to'.
Full project documentation is available here.
This library is currently experimental. Until v1.0.0 is released, breaking changes will only incur a minor version increment.
$ npm install @trust/keyto --save
Translate Private PEM to Public JWK:
const keyto = require('@trust/keyto')
let pemPrivate = getPrivatePemStringSomehow()
let jwk = getPublicJwkSomehow()
// String data can either be passed in directly:
let key = keyto.from(pemPrivate, 'pem').toJwk('public')
// Or can be passed in as an object instead:
let key = keyto.from({ key: pemPrivate }, 'pem').toJwk('public')
assertEqual(jwk, key)
Translate Private Hex (Blockchain) Key to PKCS8 Public PEM:
const keyto = require('@trust/keyto')
let blk = getPrivateBlockchainHexStringSomehow()
let pemPublic = getPublicPemSomehow()
let key = keyto.from(blk, 'blk').toString('pem', 'public_pkcs8')
assertEqual(pemPublic, key)
args:
format:
Format can be any of these: 'pem', 'jwk' or 'blk'.
args:
selector:
Selector can be any of these: 'public', 'private'.
args:
format:
Format can be any of these: 'pem', 'jwk' or 'blk'.
selector:
Selector can be any of these: 'public', 'private', 'public_pkcs1', 'public_pkcs8', 'private_pkcs1' or 'private_pkcs8'.
PRs accepted.
Small note: If editing the README, please conform to the standard-readme specification.
MIT © 2017-2018 Greg Linklater
FAQs
A utility for translating cryptographic keys between representations
The npm package @trust/keyto receives a total of 34,495 weekly downloads. As such, @trust/keyto popularity was classified as popular.
We found that @trust/keyto demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.